package com.comparator;

import java.util.Comparator;

public class GFSFareClassOccurrence {
	

	public static class SortByDirectionalInd implements Comparator<GFSFareClassOccurrence> {
		@Override
		public int compare(final GFSFareClassOccurrence gfsFcOcc1,
				final GFSFareClassOccurrence gfsFcOcc2) {
			if (gfsFcOcc1.getDirectionalIndicatorCode() == null
					&& gfsFcOcc2.getDirectionalIndicatorCode() == null)
				return 0;

			if (gfsFcOcc1.getDirectionalIndicatorCode() == null)
				return -1;

			if (gfsFcOcc2.getDirectionalIndicatorCode() == null)
				return 1;

			return gfsFcOcc1.getDirectionalIndicatorCode().compareTo(
					gfsFcOcc2.getDirectionalIndicatorCode());
		}
	}

	public static class SortByOverride994Tab implements Comparator<GFSFareClassOccurrence> {
		@Override
		public int compare(final GFSFareClassOccurrence gfsFcOcc1,
				final GFSFareClassOccurrence gfsFcOcc2) {

			if (gfsFcOcc1.getOverride994TableNum() == null
					&& gfsFcOcc2.getOverride994TableNum() == null)
				return 0;

			if (gfsFcOcc1.getOverride994TableNum() == null)
				return -1;

			if (gfsFcOcc2.getOverride994TableNum() == null)
				return 1;

			return gfsFcOcc1.getOverride994TableNum().compareTo(
					gfsFcOcc2.getOverride994TableNum());
		}
	}
	
	private String directionalIndicatorCode;
	
	private String Override994TableNum;

	/**
	 * This method is used to get the directionalIndicatorCode
	 * @return directionalIndicatorCode - String
	 */
	
	public String getDirectionalIndicatorCode() {
		return directionalIndicatorCode;
	}

	/**
	 * This method is used to set the directionalIndicatorCode
	 * @param directionalIndicatorCode - String
	 */
	
	public void setDirectionalIndicatorCode(String directionalIndicatorCode) {
		this.directionalIndicatorCode = directionalIndicatorCode;
	}

	/**
	 * This method is used to get the override994TableNum
	 * @return override994TableNum - String
	 */
	
	public String getOverride994TableNum() {
		return Override994TableNum;
	}

	/**
	 * This method is used to set the override994TableNum
	 * @param override994TableNum - String
	 */
	
	public void setOverride994TableNum(String override994TableNum) {
		Override994TableNum = override994TableNum;
	}
	
	
}
